<?php

class testWakServerLogFile extends UnitTestCase {

    function testWrite() {
        $log = WakServerLogFile::getForDay($this->_getPath(), 'server');
        if ($this->assertIsA($log, 'WakServerLogFile'
            , "WakServerLogFile::getForDay(path, basename) should return a WakServerLogFile")) {
            $this->assertEqual($log->basename(), 'server.'.date('Y-m-d').'.log'
                , "basename() should be {basename}.{yyyy-mm-dd}.log");
            $this->assertTrue($log->addEntry(),
                "addEntry(void) should return true");
        }

        // deleting file

    }

    function _getPath() {
        $path = Webappkit::getPathFromId('webappkit.fs.log');
        return $path.'tests/fixtures/';
    }
}